import type { Router } from "vue-router";
import { createPermissionGuard } from "./permission-guard";
import { createPageLoadingGuard } from "./page-loading-guard";
import { createPageTitleGuard } from "./page-title-guard";

/**
 * 路由守卫函数
 * @param router - 路由实例
 */
export const setupRouterGuard = (router: Router) => {
  createPageLoadingGuard(router);
  createPermissionGuard(router);
  createPageTitleGuard(router);
};
